<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="favicon.ico" />
<link href="user/css/UserCenter.css?v=<?=WEB_VERSION?>" rel="stylesheet" type="text/css" />
<script src="user/js/jquery-1.7.1.min.js?v=<?=WEB_VERSION?>" type="text/javascript" language="javascript"></script>
<script src="user/js/UserWin.min.js?v=<?=WEB_VERSION?>" type="text/javascript" language="javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
	$('.Jiuxposd dd').eq(0).hover(function(){$('.Jiuxposd dd').attr('class',''); $(this).attr('class','Onksujifen'); $('.WuJifen').attr('style','display:none;');$('#WU4').attr('style','display:block;');});
	$('.Jiuxposd dd').eq(1).hover(function(){$('.Jiuxposd dd').attr('class',''); $(this).attr('class','Onksujifen');$('.WuJifen').attr('style','display:none;');$('#WU3').attr('style','display:block;');});
	$('.Jiuxposd dd').eq(2).hover(function(){$('.Jiuxposd dd').attr('class',''); $(this).attr('class','Onksujifen');$('.WuJifen').attr('style','display:none;');$('#WU2').attr('style','display:block;');});
	$('.Jiuxposd dd').eq(3).hover(function(){$('.Jiuxposd dd').attr('class',''); $(this).attr('class','Onksujifen');$('.WuJifen').attr('style','display:none;');$('#WU1').attr('style','display:block;');});
	
});
</script>
<title>我的积分</title>
</head>
<body>
<?include('userTop.php')?>
<div class="CenterAuto">
	<?
    include('userLeft.php')
    ?>
    
    <div class="CenterRight">
		<?
	    include('userMenu.php')
	    ?>
    	<p style="text-indent:2em; padding:10px 0; font-size:16px;">可用积分：<em style="font-weight:bold; color:#C00;"><?=$user['integral']?></em></p>
    	<div class="PublicUserListTitle"><em>兑换代金券</em>(注释：10积分兑换一元代金券，一概兑换，不能退还；缺席课程不予补偿;)</div>
    	<form action="" method="post" name="Integral">
		    <table width="770" border="0" cellspacing="2" cellpadding="0">
		    <tr>
		      <td height="30" align="center" valign="middle" bgcolor="#0D6DB7" class="ColorFFF">代金券金额</td>
		      <td height="30" align="center" valign="middle" bgcolor="#0D6DB7" class="ColorFFF">有效期(天)</td>
		      <td height="30" align="center" valign="middle" bgcolor="#0D6DB7" class="ColorFFF">操作</td>
		      </tr>
	            <?
	            foreach($ticket as $v){
				?>		      
		      <tr>
		        <td height="30" align="center" valign="middle" bgcolor="#E7E7E7"><?=$v['price']?></td>
		        <td height="30" align="center" valign="middle" bgcolor="#E7E7E7"><?=$v['period_validity']?></td>
		        <td height="30" align="center" valign="middle" bgcolor="#E7E7E7">
		        <a href="user_exchange.htm?id=<?=$v['id']?>">兑换</a>
		        </td>
		      </tr>
	            <?
				}
				?>
		    </table>
			<input type="submit" value="点击确认兑换" class="PublicPrice" style="letter-spacing:4px; width:200px; height:30px; line-height:30px;" />
    	 </form>
    	
    	<div class="PublicUserListTitle"><em>积分明细</em>(注释：上一节课获得积分2分。)</div>
    	<div class="PublicPages"><?echo $integralLog['page']?></div>
    <table width="770" border="0" cellspacing="2" cellpadding="0">
    <tr>
      <td height="30" align="center" valign="middle" bgcolor="#0D6DB7" class="ColorFFF">来源/用途</td>
      <td height="30" align="center" valign="middle" bgcolor="#0D6DB7" class="ColorFFF">收入</td>
      <td height="30" align="center" valign="middle" bgcolor="#0D6DB7" class="ColorFFF">支出</td>
      <td height="30" align="center" valign="middle" bgcolor="#0D6DB7" class="ColorFFF">日期</td>
    </tr>
         <?
            foreach($integralLog['list'] as $v){
				$income  =  $v['integral']>0?$v['integral']:0;
				$spending  = $v['integral']<0?abs($v['integral']):0;
			?>    
    <tr>
      <td height="30" align="center" valign="middle" bgcolor="#E7E7E7"><?=$integralType[$v['type']]?></td>
      <td height="30" align="center" valign="middle" bgcolor="#E7E7E7"><?=$income?></td>
      <td height="30" align="center" valign="middle" bgcolor="#E7E7E7"><?=$spending?></td>
      <td height="30" align="center" valign="middle" bgcolor="#E7E7E7"><?=date('Y-m-d',$v['time'])?></td>
    </tr>
      <?
		}
	 ?>
  	</table>
  	<div class="PublicPages"><?echo $integralLog['page']?></div>
  </div>
    <div class="clearc"></div>
</div>
<?
include('userFoot.php')
?>
</body>
</html>
